/**
  * 描述：
  * 
  * @Author ${author}
  * @mail ${mail}
  * @Date ${date}
  */
import fetch from '@/utils/fetch';

const gcDustbinApi = {
    getPageList (params) {
        return fetch({
            url: '/api/gcDustbin/',
            method: 'get',
            params: params
        });
    },
    getDetail (data) {
        return fetch({
            url: '/api/gcDustbin/'+data.id,
            method: 'get',
        });
    },
	getUpdata(data){
		    return fetch({
		    url: '/api/gcDustbin/getMachineSoftPathByType/'+data.sbType+'/'+data.state,
		    method: 'get',
		});
	},
	newToUp(data){
		return fetch({
		    url: '/api/gcDustbin/downLoad',
		    method: 'post',
			data : data
		});
	},
    add (data) {
        return fetch({
            url: '/api/gcDustbin',
            method: 'post',
            data: data
        });
    },
    update (data) {
        return fetch({
            url: '/api/gcDustbin',
            method: 'put',
            data: data
        });
    },
	recover (data) {
	    return fetch({
	        url: '/api/gcDustbin/'+data.code,
	        method: 'put',
	        
	    });
	},
    del (data) {
        return fetch({
            url: '/api/gcDustbin/'+data.id,
            method: 'delete',
        });
    },
    getCount(){
        return fetch({
            url: '/api/gcDustbin/getCount',
            method: 'get',
        });
    },
    getStatus(params){
        return fetch({
            url: '/api/home/devicesStatus',
            method: 'get',
            params: params
        });
    }
};
export default gcDustbinApi;
